package com.easy.project.base.result;

/**
 * 系统异常枚举
 * @author wxz
 */
public enum SystemErrorCodeEnum implements IBaseErrorCode {
    /**
     * 调用成功枚举
     */
    SUCCESS("00000","成功"),
    /**
     * 系统错误枚举
     */
    ERROR("00001","系统错误"),

    /**
     * 系统错误枚举 带详细信息
     */
    ERROR_INFO("00001","系统错误:%s"),

    /**
     * 参数验证异常
     */
    ARGUMENT_VALID_ERROR("00002","参数验证异常"),

    /**
     * 文件上传失败
     */
    FILE_UPLOAD_ERROR("00003","文件上传失败"),

    /**
     * 文件上传失败
     */
    FILE_MAX_ERROR("00004","文件大小超过限制,上传失败"),

    /**
     * excel导出失败
     */
    EXCEL_EXPORT_ERROR("00005","excel导出失败"),

    /**
     * 数据没有找到
     */
    DATA_FIND_ERROR("00006","数据未找到"),

    /**
     * 登录失败
     */
    LOGIN_ERROR("00007","用户名或密码错误"),

    TOKEN_ERROR("00008","token已失效请重新登录!"),

    FILE_DOWNLOAD_ERROR("00009","文件下载失败!"),
    ;

    SystemErrorCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    /**
     * 错误码
     */
    private final String code;
    /**
     * 错误信息
     */
    private final String msg;

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}
